<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Juancho's</title>
</head>
<body>
	<h1>Consultas</h1>

	<c:url var="addUrl" value="/pan/add" />
	<table style="border: 1px solid; width: 1500px; text-align: center">
		<thead style="background: #fcf">
			<tr>
				<th>Nombre :</th>
				<th>ingrediente :</th>
				<th>ingrediente :</th>
				<th>tipo :</th>
				<th>Prcio :</th>
				<th>categoria</th>
				<th>descripcion :</th>
				<th colspan="8"></th>
			</tr>
		</thead>
		<tbody>
			<c:forEach items="${hambures}" var="hambur">
				<c:url var="editUrl" value="/pan/update?id=${hambur.id}" />
				<c:url var="deleteUrl" value="/pan/delete?id=${hambur.id}" />
				<c:url var="getUrl" value="/pan/get?id=${hambur.id}" />
				<tr>
					<td><c:out value="${hambur.nombre}" /></td>
					<td><c:out value="${hambur.imgrediente1}" /></td>
					<td><c:out value="${hambur.imgrediente2}" /></td>
					<td><c:out value="${hambur.tipo}" /></td>
					<td><c:out value="${hambur.precio}" /></td>
					<td><c:out value="${hambur.categoria}" /></td>
					<td><c:out value="${hambur.descripcion}" /></td>

					<td><a href="${editUrl}">Edit</a></td>
					<td><a href="${deleteUrl}">Delete</a></td>
					<td><a href="${addUrl}">Add</a></td>
					<td><a href="${getUrl}">Get</a></td>
				</tr>
			</c:forEach>
		</tbody>
	</table>

	<c:if test="${empty hambures}">
	There are currently no persons in the list. <a href="${addUrl}">Add</a> a person.
</c:if>

</body>
</html>